import request from '../../utils/request';
// 添加地址
export function postAdd(data){
    return request.post('/p/address/addAddr',data)
}
// 获取所有地址列表
export function getList (){
    return request.get('/p/address/list')
}
// 默认选中
export function putChange(addrId){
    return request.put(`/p/address/defaultAddr/${addrId}`)
}
// 详情
export function getEdit(addrId){
    return request.get(`/p/address/addrInfo/${addrId}`)
}
// 删除
export function deleteEdit(addrId){
    return request.delete(`/p/address/deleteAddr/${addrId}`)
}
// 修改
export function updateEdit(data){
    return request.put('/p/address/updateAddr',data)
}
// 地址   /p/area/listByPid?pid=0
export function getAreaByPid(pid){
    return request.get('/p/area/listByPid?pid='+pid)
}